import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import Home from '../views/home'
const routes = [
  { // 首页无需懒加载
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/plan',
    name: 'plan',
    component: () => import(/* webpackChunkName: "plan" */ '../views/plan')
  }
]

const router = createRouter({
  // history: createWebHistory(process.env.BASE_URL), ssr路由
  history: createWebHashHistory(process.env.BASE_URL), // hash 路由
  routes
})

export default router
